home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-04 | 54.7 KB | 1,705 lines |
- This is patch #2 to Moira release 2.2, of Wed May 2 12:11:40 EDT 1990
- (revised Wed Sep 5 16:31:30 EDT 1990)
-
- BE SURE TO APPLY THIS PATCH WITH
-
- patch -p
-
- TO PRESERVE THE DIRECTORY HIERARCHY.
-
- The following bugs are fixed:
-
- 1. Update patchlevel.h to indicate we are at patchlevel 2.
- 2. Fix a list dependancy problem and some lint errors in the aliases extract.
- 3. Have top-level Makefile create the profiled directories.
- 4. Speedups and several fixes to the mailhub extract.
- 5. Have the install_dirs script no longer use sms_untar (no longer
- works around old quota bugs).
- 6. Several pieces of documentation refer to the file db/dbbuild which
- was renamed to db/newdb a long time ago.
- 7. The installation instructions didn't mention nightly backups.
- 8. Some incorrect array sizes in the moira client could cause coredumps.
- 9. Some lint in the moira client could cause unusual behavior under
- certain compilers.
- 10.Removed cistrcmp() which duplicated library function strcasecmp().
-
-
-
- *** /tmp/,RCSt1023961 Wed May 2 12:14:25 1990
- --- patchlevel.h Wed May 2 12:07:36 1990
- ***************
- *** 1 ****
- ! #define PATCHLEVEL 1
- --- 1 ----
- ! #define PATCHLEVEL 2
- *** /tmp/,RCSt1023970 Wed May 2 12:15:15 1990
- --- gen/aliases.qc Tue Apr 10 12:42:38 1990
- ***************
- *** 1,4 ****
- ! /* $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/gen/RCS/aliases.qc,v 1.14 90/03/19 19:05:48 mar Exp $
- *
- * This generates the /usr/lib/aliases mail aliases file for the mailhub.
- * The aliases file will contain:
- --- 1,4 ----
- ! /* $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/gen/RCS/aliases.qc,v 1.15 90/04/10 12:42:07 mar Exp $
- *
- * This generates the /usr/lib/aliases mail aliases file for the mailhub.
- * The aliases file will contain:
- ***************
- *** 110,116 ****
- static int ingerr(num)
- int *num;
- {
- - char buf[256];
- int ingres_errno;
-
- switch (*num) {
- --- 110,115 ----
- ***************
- *** 270,276 ****
- return;
- }
- l->maillist = 2;
- ! output_mlist(id, l, out);
-
- if (l->acl_t == 'L' && (l1 = (struct list *)hash_lookup(lists, l->acl_id)))
- save_mlist(0, l1, 1);
- --- 269,275 ----
- return;
- }
- l->maillist = 2;
- ! output_mlist(id, l);
-
- if (l->acl_t == 'L' && (l1 = (struct list *)hash_lookup(lists, l->acl_id)))
- save_mlist(0, l1, 1);
- ***************
- *** 277,283 ****
-
- for (m = l->m; m; m = m->next) {
- if (m->list_id && (l1 = (struct list *)hash_lookup(lists, m->list_id)))
- ! save_mlist(0, l1, 0);
- }
- }
-
- --- 276,282 ----
-
- for (m = l->m; m; m = m->next) {
- if (m->list_id && (l1 = (struct list *)hash_lookup(lists, m->list_id)))
- ! save_mlist(0, l1, 1);
- }
- }
-
- ***************
- *** 284,298 ****
-
- int lwid, bol, awid;
-
- ! output_mlist(id, l, dummy)
- int id;
- register struct list *l;
- - int dummy;
- {
- struct list *l1;
- register struct member *m;
- struct user *u;
- - int id;
-
- put_fill(out, l->description);
- if (l->acl_t == 'L') {
- --- 283,295 ----
-
- int lwid, bol, awid;
-
- ! output_mlist(id, l)
- int id;
- register struct list *l;
- {
- struct list *l1;
- register struct member *m;
- struct user *u;
-
- put_fill(out, l->description);
- if (l->acl_t == 'L') {
- ***************
- *** 380,388 ****
- do_poboxes(out)
- FILE *out;
- {
- - register char *p;
- - char *index();
- -
- fprintf(out, "\n%s\n# User Poboxes\n%s\n", divide, divide);
-
- hash_step(users, do_pobox, out);
- --- 377,382 ----
- *** /tmp/,RCSt1023986 Wed May 2 12:20:15 1990
- --- Makefile Wed May 2 12:19:58 1990
- ***************
- *** 1,7 ****
- # Makefile for SMS 2.0
- #
- # $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/RCS/Makefile,v $
- ! # $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/RCS/Makefile,v 1.14 90/03/30 17:30:21 mar Exp $
- # $Author: mar $
- #
- # (c) Copyright 1988 by the Massachusetts Institute of Technology.
- --- 1,7 ----
- # Makefile for SMS 2.0
- #
- # $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/RCS/Makefile,v $
- ! # $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/RCS/Makefile,v 1.15 90/05/02 12:19:43 mar Exp $
- # $Author: mar $
- #
- # (c) Copyright 1988 by the Massachusetts Institute of Technology.
- ***************
- *** 16,21 ****
- --- 16,22 ----
- INSTALLDIRS= include
-
- all:
- + -@mkdir et/profiled gdb/profiled rpc/profiled server/profiled
- if [ -f /usr/rtingres/bin/eqc ]; then \
- DIRS="${ALLDIRS}" ; \
- else \
- *** /tmp/,RCSt1023997 Wed May 2 12:25:33 1990
- --- gen/mailhub.qc Fri Apr 13 15:16:25 1990
- ***************
- *** 1,5 ****
-
- ! /* $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/gen/RCS/mailhub.qc,v 1.5 90/03/19 19:06:11 mar Exp $
- *
- * This generates the /usr/lib/aliases file for the mailhub.
- *
- --- 1,5 ----
-
- ! /* $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/gen/RCS/mailhub.qc,v 1.7 90/04/13 15:15:28 mar Exp $
- *
- * This generates the /usr/lib/aliases file for the mailhub.
- *
- ***************
- *** 23,28 ****
- --- 23,29 ----
- char *whoami = "mailhub.gen";
- char *ingres_date_and_time();
- char *perm_malloc();
- + char *pstrsave();
- char *divide = "##############################################################";
-
- #define ML_WID 72
- ***************
- *** 31,43 ****
- #define FALSE 0
- #define TRUE (!FALSE)
-
-
- main(argc, argv)
- int argc;
- char **argv;
- {
- long tm = time(NULL);
- - FILE *out= stdout;
- char filename[64], *targetfile;
- struct stat sb;
- ## int flag;
- --- 32,45 ----
- #define FALSE 0
- #define TRUE (!FALSE)
-
- + FILE *out= stdout;
-
- +
- main(argc, argv)
- int argc;
- char **argv;
- {
- long tm = time(NULL);
- char filename[64], *targetfile;
- struct stat sb;
- ## int flag;
- ***************
- *** 82,89 ****
- sort_info();
-
- fprintf(stderr, "Dumping information\n");
- ! do_lists(out);
- ! do_people(out);
-
- fprintf(out, "\n%s\n# End of aliases file\n", divide);
-
- --- 84,90 ----
- sort_info();
-
- fprintf(stderr, "Dumping information\n");
- ! do_people();
-
- fprintf(out, "\n%s\n# End of aliases file\n", divide);
-
- ***************
- *** 165,180 ****
- ## retrieve (buf = list.modtime) where list.list_id = 0
-
- cnt = 0;
- ! machines = create_hash(1000);
- ! ## retrieve (id = machine.mach_id, name = machine.#name) {
- if (s = index(name, '.'))
- *s = 0;
- #ifdef ATHENA
- ! sprintf(buf, "%s.LOCAL", name);
- ! if (hash_store(machines, id, strsave(buf)) < 0) {
- ! #else
- ! if (hash_store(machines, id, strsave(name)) < 0) {
- #endif
- fprintf(stderr, "Out of memory!\n");
- exit(MR_NO_MEM);
- }
- --- 166,182 ----
- ## retrieve (buf = list.modtime) where list.list_id = 0
-
- cnt = 0;
- ! machines = create_hash(10);
- ! ## retrieve (id = machine.mach_id, name = machine.#name)
- ! ## where machine.mach_id = users.pop_id {
- if (s = index(name, '.'))
- *s = 0;
- + else
- + strtrim(name);
- #ifdef ATHENA
- ! strcat(name, ".LOCAL");
- #endif
- + if (hash_store(machines, id, pstrsave(name)) < 0) {
- fprintf(stderr, "Out of memory!\n");
- exit(MR_NO_MEM);
- }
- ***************
- *** 183,191 ****
- fprintf(stderr, "Loaded %d machines\n", cnt);
-
- cnt = 0;
- ! strings = create_hash(2000);
- ## retrieve (id = strings.string_id, name = strings.string) {
- ! if (hash_store(strings, id, strsave(strtrim(name))) < 0) {
- fprintf(stderr, "Out of memory!\n");
- exit(MR_NO_MEM);
- }
- --- 185,193 ----
- fprintf(stderr, "Loaded %d machines\n", cnt);
-
- cnt = 0;
- ! strings = create_hash(4000);
- ## retrieve (id = strings.string_id, name = strings.string) {
- ! if (hash_store(strings, id, pstrsave(strtrim(name))) < 0) {
- fprintf(stderr, "Out of memory!\n");
- exit(MR_NO_MEM);
- }
- ***************
- *** 201,209 ****
- ## type = u.potype, pid = u.pop_id, bid = u.box_id)
- ## where u.status != 3 {
- u = (struct user *) perm_malloc(sizeof(struct user));
- ! u->login = strsave(strtrim(name));
- ! u->first = strsave(strtrim(fname));
- ! u->last = strsave(strtrim(lname));
- if (mname[0] != ' ')
- u->mi = mname[0];
- else
- --- 203,211 ----
- ## type = u.potype, pid = u.pop_id, bid = u.box_id)
- ## where u.status != 3 {
- u = (struct user *) perm_malloc(sizeof(struct user));
- ! u->login = pstrsave(strtrim(name));
- ! u->first = pstrsave(strtrim(fname));
- ! u->last = pstrsave(strtrim(lname));
- if (mname[0] != ' ')
- u->mi = mname[0];
- else
- ***************
- *** 210,217 ****
- u->mi = 0;
-
- if (type[0] == 'P' && (s = hash_lookup(machines, pid))) {
- ! sprintf(buf, "%s@%s", strtrim(name), s);
- ! u->pobox = strsave(buf);
- } else if (type[0] == 'S') {
- u->pobox = hash_lookup(strings, bid);
- } else
- --- 212,219 ----
- u->mi = 0;
-
- if (type[0] == 'P' && (s = hash_lookup(machines, pid))) {
- ! sprintf(buf, "%s@%s", u->login, s);
- ! u->pobox = pstrsave(buf);
- } else if (type[0] == 'S') {
- u->pobox = hash_lookup(strings, bid);
- } else
- ***************
- *** 231,237 ****
- ## type = l.acl_type, acl = l.acl_id)
- ## where l.active != 0 {
- l = (struct list *) perm_malloc(sizeof(struct list));
- ! l->name = strsave(strtrim(name));
- l->maillist = maillistp;
- l->acl_t = type[0];
- l->acl_id = acl;
- --- 233,239 ----
- ## type = l.acl_type, acl = l.acl_id)
- ## where l.active != 0 {
- l = (struct list *) perm_malloc(sizeof(struct list));
- ! l->name = pstrsave(strtrim(name));
- l->maillist = maillistp;
- l->acl_t = type[0];
- l->acl_id = acl;
- ***************
- *** 284,291 ****
- register struct member *m;
- register struct list *l1;
-
- ! if (l->maillist == 2 ||
- ! l->maillist == 3 ||
- (l->maillist == 0 && !force))
- return;
-
- --- 286,292 ----
- register struct member *m;
- register struct list *l1;
-
- ! if (l->maillist > 1 ||
- (l->maillist == 0 && !force))
- return;
-
- ***************
- *** 295,301 ****
- return;
- }
- l->maillist = 2;
- ! insert_name(l->name, -id, TRUE, FALSE);
-
- if (l->acl_t == 'L' && (l1 = (struct list *)hash_lookup(lists, l->acl_id)))
- save_mlist(0, l1, TRUE);
- --- 296,303 ----
- return;
- }
- l->maillist = 2;
- ! insert_name(l->name, -1, TRUE, FALSE);
- ! output_mlist(id, l);
-
- if (l->acl_t == 'L' && (l1 = (struct list *)hash_lookup(lists, l->acl_id)))
- save_mlist(0, l1, TRUE);
- ***************
- *** 356,366 ****
- exit(MR_NO_MEM);
- }
- if (copy)
- ! ns->name = strsave(s);
- else
- ns->name = s;
- ns->keep = nodups;
- ns->id = id;
- if (hash_store(names, code, ns) < 0) {
- fprintf(stderr, "Out of memory!\n");
- exit(MR_NO_MEM);
- --- 358,369 ----
- exit(MR_NO_MEM);
- }
- if (copy)
- ! ns->name = pstrsave(s);
- else
- ns->name = s;
- ns->keep = nodups;
- ns->id = id;
- + ns->next = NULL;
- if (hash_store(names, code, ns) < 0) {
- fprintf(stderr, "Out of memory!\n");
- exit(MR_NO_MEM);
- ***************
- *** 380,395 ****
- }
- ns = ns->next;
- if (copy)
- ! ns->name = strsave(s);
- else
- ns->name = s;
- ns->keep = nodups;
- ns->id = id;
- return;
- }
- foundns:
- ! if (nodups || ns->keep)
- ! return;
- ns->id = 0;
- }
-
- --- 383,402 ----
- }
- ns = ns->next;
- if (copy)
- ! ns->name = pstrsave(s);
- else
- ns->name = s;
- ns->keep = nodups;
- ns->id = id;
- + ns->next = NULL;
- return;
- }
- foundns:
- ! if (nodups || ns->keep) {
- ! if (nodups && ns->keep)
- ! fprintf(stderr, "duplicated named: %s\n", s);
- ! return;
- ! }
- ns->id = 0;
- }
-
- ***************
- *** 444,450 ****
- --- 451,460 ----
- {
- names = create_hash(20001);
- hash_step(users, insert_login, NULL);
- + incount = 0;
- + fprintf(out, "\n%s\n# Mailing lists\n%s\n", divide, divide);
- hash_step(lists, save_mlist, FALSE);
- + fprintf(stderr, "Output %d lists\n", incount);
- hash_step(users, insert_names, NULL);
- fprintf(stderr, "Inserted %d names\n", incount);
- }
- ***************
- *** 480,496 ****
-
- int lwid, bol, awid;
-
- ! output_mlist(id, l, out)
- int id;
- register struct list *l;
- - FILE *out;
- {
- struct list *l1;
- register struct member *m;
- register struct user *u;
-
- - if (l->maillist != 2)
- - return;
- if (l->acl_t == 'L' &&
- (l1 = (struct list *) hash_lookup(lists, l->acl_id)))
- fprintf(out, "owner-%s: %s\n%s: ", l->name, l1->name, l->name);
- --- 490,503 ----
-
- int lwid, bol, awid;
-
- ! output_mlist(id, l)
- int id;
- register struct list *l;
- {
- struct list *l1;
- register struct member *m;
- register struct user *u;
-
- if (l->acl_t == 'L' &&
- (l1 = (struct list *) hash_lookup(lists, l->acl_id)))
- fprintf(out, "owner-%s: %s\n%s: ", l->name, l1->name, l->name);
- ***************
- *** 497,502 ****
- --- 504,512 ----
- else if (l->acl_t == 'U' &&
- (u = (struct user *) hash_lookup(users, l->acl_id)))
- fprintf(out, "owner-%s: %s\n%s: ", l->name, u->login, l->name);
- + else
- + fprintf(out, "%s: ", l->name);
- +
-
- lwid = strlen(l->name) + 2;
- bol = 1;
- ***************
- *** 547,565 ****
- }
-
-
- ! do_lists(out)
- ! FILE *out;
- {
- incount = 0;
- - fprintf(out, "\n%s\n# Mailing lists\n%s\n", divide, divide);
- - hash_step(lists, output_mlist, out);
- - fprintf(stderr, "Output %d lists\n", incount);
- - }
- -
- - do_people(out)
- - FILE *out;
- - {
- - incount = 0;
- fprintf(out, "\n%s\n# People\n%s\n", divide, divide);
- hash_step(names, output_data, out);
- fprintf(stderr, "Output %d entries\n", incount);
- --- 557,565 ----
- }
-
-
- ! do_people()
- {
- incount = 0;
- fprintf(out, "\n%s\n# People\n%s\n", divide, divide);
- hash_step(names, output_data, out);
- fprintf(stderr, "Output %d entries\n", incount);
- ***************
- *** 586,588 ****
- --- 586,765 ----
- return(ret);
- }
-
- +
- + /*
- + * Make a (permenant) copy of a string.
- + */
- + char *
- + pstrsave(s)
- + char *s;
- + {
- + register int len;
- + register char *p;
- + /* Kludge for sloppy string semantics */
- + if (!s) {
- + printf("NULL != \"\" !!!!\r\n");
- + p = perm_malloc(1);
- + *p = '\0';
- + return p;
- + }
- + len = strlen(s) + 1;
- + p = perm_malloc((u_int)len);
- + if (p) bcopy(s, p, len);
- + return p;
- + }
- +
- + #define hash_func(h, key) (key >= 0 ? (key % h->size) : (-key % h->size))
- +
- + /* Create a hash table. The size is just a hint, not a maximum. */
- +
- + struct hash *create_hash(size)
- + int size;
- + {
- + struct hash *h;
- +
- + h = (struct hash *) perm_malloc(sizeof(struct hash));
- + if (h == (struct hash *) NULL)
- + return((struct hash *) NULL);
- + h->size = size;
- + h->data = (struct bucket **) perm_malloc(size * sizeof(char *));
- + if (h->data == (struct bucket **) NULL) {
- + free(h);
- + return((struct hash *) NULL);
- + }
- + bzero(h->data, size * sizeof(char *));
- + return(h);
- + }
- +
- + /* Lookup an object in the hash table. Returns the value associated with
- + * the key, or NULL (thus NULL is not a very good value to store...)
- + */
- +
- + char *hash_lookup(h, key)
- + struct hash *h;
- + register int key;
- + {
- + register struct bucket *b;
- +
- + b = h->data[hash_func(h, key)];
- + while (b && b->key != key)
- + b = b->next;
- + if (b && b->key == key)
- + return(b->data);
- + else
- + return(NULL);
- + }
- +
- +
- + /* Update an existing object in the hash table. Returns 1 if the object
- + * existed, or 0 if not.
- + */
- +
- + int hash_update(h, key, value)
- + struct hash *h;
- + register int key;
- + char *value;
- + {
- + register struct bucket *b;
- +
- + b = h->data[hash_func(h, key)];
- + while (b && b->key != key)
- + b = b->next;
- + if (b && b->key == key) {
- + b->data = value;
- + return(1);
- + } else
- + return(0);
- + }
- +
- +
- + /* Store an item in the hash table. Returns 0 if the key was not previously
- + * there, 1 if it was, or -1 if we ran out of memory.
- + */
- +
- + int hash_store(h, key, value)
- + struct hash *h;
- + register int key;
- + char *value;
- + {
- + register struct bucket *b, **p;
- +
- + p = &(h->data[hash_func(h, key)]);
- + if (*p == NULL) {
- + b = *p = (struct bucket *) perm_malloc(sizeof(struct bucket));
- + if (b == (struct bucket *) NULL)
- + return(-1);
- + b->next = NULL;
- + b->key = key;
- + b->data = value;
- + return(0);
- + }
- +
- + for (b = *p; b && b->key != key; b = *p)
- + p = (struct bucket **) *p;
- + if (b && b->key == key) {
- + b->data = value;
- + return(1);
- + }
- + b = *p = (struct bucket *) perm_malloc(sizeof(struct bucket));
- + if (b == (struct bucket *) NULL)
- + return(-1);
- + b->next = NULL;
- + b->key = key;
- + b->data = value;
- + return(0);
- + }
- +
- +
- + /* Search through the hash table for a given value. For each piece of
- + * data with that value, call the callback proc with the corresponding key.
- + */
- +
- + hash_search(h, value, callback)
- + struct hash *h;
- + register char *value;
- + void (*callback)();
- + {
- + register struct bucket *b, **p;
- +
- + for (p = &(h->data[h->size - 1]); p >= h->data; p--) {
- + for (b = *p; b; b = b->next) {
- + if (b->data == value)
- + (*callback)(b->key);
- + }
- + }
- + }
- +
- +
- + /* Step through the hash table, calling the callback proc with each key.
- + */
- +
- + hash_step(h, callback, hint)
- + struct hash *h;
- + void (*callback)();
- + char *hint;
- + {
- + register struct bucket *b, **p;
- +
- + for (p = &(h->data[h->size - 1]); p >= h->data; p--) {
- + for (b = *p; b; b = b->next) {
- + (*callback)(b->key, b->data, hint);
- + }
- + }
- + }
- +
- +
- + /* Deallocate all of the memory associated with a table */
- +
- + hash_destroy(h)
- + struct hash *h;
- + {
- + register struct bucket *b, **p, *b1;
- +
- + for (p = &(h->data[h->size - 1]); p >= h->data; p--) {
- + for (b = *p; b; b = b1) {
- + b1 = b->next;
- + free(b);
- + }
- + }
- + }
- *** /tmp/,RCSt1024004 Wed May 2 12:29:06 1990
- --- gen/install_dirs Tue Apr 10 17:06:20 1990
- ***************
- *** 56,64 ****
- # *****
-
- # Give user prototype files
- ! # sms_untar is a setuid argv[1] tar xfp -
- ! (cd $tmpdir; sms_untar $uid < $USERTAR)
- if ($status) set WARN
- breaksw
- case COURSE:
- /bin/chmod 775 $tmpdir
- --- 56,64 ----
- # *****
-
- # Give user prototype files
- ! (cd $tmpdir; tar xf $USERTAR)
- if ($status) set WARN
- + chown $uid.$gid $tmpdir $tmpdir/.??* $tmpdir/*
- breaksw
- case COURSE:
- /bin/chmod 775 $tmpdir
- ***************
- *** 75,79 ****
-
- #
- # $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/gen/RCS/install_dirs,v $
- ! # $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/gen/RCS/install_dirs,v 1.8 90/03/19 19:06:05 mar Exp $
- #
- --- 75,79 ----
-
- #
- # $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/gen/RCS/install_dirs,v $
- ! # $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/gen/RCS/install_dirs,v 1.9 90/04/10 17:06:02 mar Exp $
- #
- *** /mit/bitbucket/mar/moira/db/README Wed Feb 14 11:12:49 1990
- --- db/README Wed Apr 25 14:54:25 1990
- ***************
- *** 1,8 ****
- ! /mit/smsdev/db/README: $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/db/RCS/README,v 1.3 90/02/14 11:12:40 mar Exp $
-
- This directory contains stuff necessary to create and initialize an
- sms database. Note that some other directories rely on files here
- ! (notably dbbuild), and that the newsms program relies on other files.
-
- STEPS TO CREATE A DATABASE:
-
- --- 1,8 ----
- ! /mit/smsdev/db/README: $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/db/RCS/README,v 1.4 90/04/25 14:54:12 mar Exp $
-
- This directory contains stuff necessary to create and initialize an
- sms database. Note that some other directories rely on files here
- ! (notably newdb), and that the newsms program relies on other files.
-
- STEPS TO CREATE A DATABASE:
-
- *** /tmp/install.mss Wed Sep 5 15:41:08 1990
- --- doc/install.mss Wed Sep 5 15:40:58 1990
- ***************
- *** 145,151 ****
- --- 145,160 ----
- and @b(register.)@i[machinename]@@@i[localrealm] is needed to run the
- registration service.
-
- + Finally, make entries in /etc/services:
- + @example{
- + sms_db 775/tcp # Moira database
- + sms_update 777/tcp # Moira update protocol
- + sms_ureg 779/udp # Moira user registration
- + }
- + These are the numbers we use at Athena. They are not officially
- + allocated, and you may change them at your site.
-
- +
- @Subheading(Testing the Services)
-
- At this point the server and clients may be tested. Run
- ***************
- *** 198,204 ****
- --- 207,219 ----
- DCMs started every 15 minutes won't do anything until we removed that
- file.
-
- + A final piece of configuration is regular backups. We backup the
- + database over the net, rather than backing up the filesystem. This
- + allows us to restore the database on another machine architecture, if
- + necessary. We do this by having @i(cron) run BIN_DIR@i(/nightly.sh)
- + at 5am each morning.
-
- +
- @SubHeading(Customization)
-
- This is difficult to give advice on, but I'll start by describing how
- ***************
- *** 216,222 ****
- objects such as users, lists, machines, etc. should be referenced by
- their internal ID numbers. If you're creating a new type that may be
- referenced by other tables, assign each object a unique ID number as
- ! well as its name. Add this table specification to @i(db/dbbuild), so
- that recompiling the backup and restore programs will cause them to
- know about the new table(s).
-
- --- 231,237 ----
- objects such as users, lists, machines, etc. should be referenced by
- their internal ID numbers. If you're creating a new type that may be
- referenced by other tables, assign each object a unique ID number as
- ! well as its name. Add this table specification to @i(db/newdb), so
- that recompiling the backup and restore programs will cause them to
- know about the new table(s).
-
- *** /mit/bitbucket/mar/moira/doc/install.doc Wed May 2 12:40:19 1990
- --- doc/install.doc Fri Apr 20 19:35:07 1990
- ***************
- *** 91,162 ****
-
- Copy all of the binaries installed in bin to BIN_DIR.
-
- Creating the Database
-
- Create an Ingres database called moira with the command "createdb sms".
-
- ! Run the script db/newdb in quel, the Ingres query interpreter, creating a
- completely empty database.
-
- Run the newmoira program to initialize the database. This program will ask:
-
- ! 1. For the name of a user to be given access to the database. Root
- ! will automatically be given access; if you want someone else to be
- ! able to access the database through quel, then enter their name(s)
- ! here. It will keep asking you for names until you enter an empty
- string.
-
- ! 2. The starting UID to assign. This is the user id to be assigned to
- ! the next account created. Each time an account is created, this
- ! number is incremented as long as it conflicts with an existing UID
- in the database, then the resulting value is used.
-
- 3. The starting GID to assign. This is used just like the UID above.
-
- ! 4. The default NFS quota. This is the quota that new users are
- assigned.
-
- ! 5. The name of a privileged user. This user will be put on the list
- ! dbadmin, which will be on the access control list for every query.
- ! This user may then make any change to the database, including
- putting other users on the dbadmin list.
-
- ! At some point, the database must be optimized. If a lot of data is to be
- added, wait until afterwards. Otherwise, you may do the optimization now. The
- ! script db/dbopt contains quel commands to modify some of the structures and
- ! create additional indexes on the tables. You should also run the ingres
- ! commands /usr/rtingres/bin/optimizedb and /usr/rtingres/bin/sysmod after data
- is loaded into the database.
-
- ! Make sure the necessary Kerberos keys are in your /etc/srvtab file on the
- ! server. For the initial server testing, only moira.machinename@localrealm is
- ! needed, but sms.[NULL]@localrealm is needed as well for updating servers, and
- register.machinename@localrealm is needed to run the registration service.
-
- Testing the Services
-
- ! At this point the server and clients may be tested. Run BIN_DIR/startmoira to
- ! get a server running. It will log everything to SMS_DIR/moira.log. The
- ! privileged user chosen above may run the moira client, and make changes to the
- ! database. To make more privileged users, put the new users on the "dbadmin"
- list.
-
- ! When this much is satisfactory, then service extraction may be initialized.
- ! Enable the desired services from the services sub-menu of the dcm menu of the
- ! moira client. Then run the DCM by invoking BIN_DIR/startdcm, and verify that
- it produces the desired file. It will log messages to SMS_DIR/dcm.log. If the
- data files are OK, then you may enable automatic update to the other servers by
- ! making additions in the hosts sub-menu of the dcm menu in the moira client.
- ! Each host must be running /usr/etc/update_server and have a Kerberos key for
- rcmd.hostname@localrealm in its /etc/srvtab to be able to receive updates.
-
- ! When service updates are satisfactory, you can set up /usr/lib/crontab to
- ! invoke BIN_DIR/startdcm every 15 minutes. When the DCM is started, it will
- determine what work there is to do.
-
- ! The only remaining part of the system is the registration server. This may be
- ! invoked by starting BIN_DIR/startreg. Note that the registration client
- ! (userreg) expects to find its data files in /mit/register. Before you can
- successfully register new accounts, you must have
-
- - People entered as users in state 0
- --- 91,171 ----
-
- Copy all of the binaries installed in bin to BIN_DIR.
-
- + Finally, make entries in /etc/services:
- +
- + sms_db 775/tcp # Moira database
- + sms_update 777/tcp # Moira update protocol
- + sms_ureg 779/udp # Moira user registration
- +
- + These are the numbers we use at Athena. They are not officially allocated, and
- + you may change them at your site.
- +
- Creating the Database
-
- Create an Ingres database called moira with the command "createdb sms".
-
- ! Run the script db/newdb in quel, the Ingres query interpreter, creating a
- completely empty database.
-
- Run the newmoira program to initialize the database. This program will ask:
-
- ! 1. For the name of a user to be given access to the database. Root
- ! will automatically be given access; if you want someone else to be
- ! able to access the database through quel, then enter their name(s)
- ! here. It will keep asking you for names until you enter an empty
- string.
-
- ! 2. The starting UID to assign. This is the user id to be assigned to
- ! the next account created. Each time an account is created, this
- ! number is incremented as long as it conflicts with an existing UID
- in the database, then the resulting value is used.
-
- 3. The starting GID to assign. This is used just like the UID above.
-
- ! 4. The default NFS quota. This is the quota that new users are
- assigned.
-
- ! 5. The name of a privileged user. This user will be put on the list
- ! dbadmin, which will be on the access control list for every query.
- ! This user may then make any change to the database, including
- putting other users on the dbadmin list.
-
- ! At some point, the database must be optimized. If a lot of data is to be
- added, wait until afterwards. Otherwise, you may do the optimization now. The
- ! script db/dbopt contains quel commands to modify some of the structures and
- ! create additional indexes on the tables. You should also run the ingres
- ! commands /usr/rtingres/bin/optimizedb and /usr/rtingres/bin/sysmod after data
- is loaded into the database.
-
- ! Make sure the necessary Kerberos keys are in your /etc/srvtab file on the
- ! server. For the initial server testing, only moira.machinename@localrealm is
- ! needed, but sms.[NULL]@localrealm is needed as well for updating servers, and
- register.machinename@localrealm is needed to run the registration service.
-
- Testing the Services
-
- ! At this point the server and clients may be tested. Run BIN_DIR/startmoira to
- ! get a server running. It will log everything to SMS_DIR/moira.log. The
- ! privileged user chosen above may run the moira client, and make changes to the
- ! database. To make more privileged users, put the new users on the "dbadmin"
- list.
-
- ! When this much is satisfactory, then service extraction may be initialized.
- ! Enable the desired services from the services sub-menu of the dcm menu of the
- ! moira client. Then run the DCM by invoking BIN_DIR/startdcm, and verify that
- it produces the desired file. It will log messages to SMS_DIR/dcm.log. If the
- data files are OK, then you may enable automatic update to the other servers by
- ! making additions in the hosts sub-menu of the dcm menu in the moira client.
- ! Each host must be running /usr/etc/update_server and have a Kerberos key for
- rcmd.hostname@localrealm in its /etc/srvtab to be able to receive updates.
-
- ! When service updates are satisfactory, you can set up /usr/lib/crontab to
- ! invoke BIN_DIR/startdcm every 15 minutes. When the DCM is started, it will
- determine what work there is to do.
-
- ! The only remaining part of the system is the registration server. This may be
- ! invoked by starting BIN_DIR/startreg. Note that the registration client
- ! (userreg) expects to find its data files in /mit/register. Before you can
- successfully register new accounts, you must have
-
- - People entered as users in state 0
- ***************
- *** 163,212 ****
-
- - 1 or more hosts as POP service providers listed in the hosts sub-menu
- of the dcm menu in the moira client. Value2 for each of these is the
- ! maximum number of poboxes that may be allocated on that server,
- value1 is the number currently allocated.
-
- ! - 1 or more NFS partitions listed in the nfs menu of the moira client.
- ! The declared size of the partition must be greater than the sum of
- the quotas that will be assigned to it. The status must be "Student"
- for register to automatically assign new users there.
-
- ! - register.moiraserver@localrealm must be on the "add" and "modify"
- access control lists for the Kerberos admin server.
-
- ! When you are confident that the system works, you may have the daemons started
- ! by /etc/rc. We prefer to start them by hand after verifying that the database
- ! survived any system crash. We also have /etc/rc create the file /etc/nodcm at
- boot time, so that the DCMs started every 15 minutes won't do anything until we
- removed that file.
-
- Customization
-
- ! This is difficult to give advice on, but I'll start by describing how we add
- new services and change things.
-
- ! 1. First determine what data must be recorded for this service. What
- is the type of each datum: integer, string, date, username,
- listname, machinename, other?
- -
- 2. Design the Ingres table to record this information. Integers may be
- ! 1, 2, or 4 bytes long. Strings may be ascii character strings
- ! (storage compresses out whitespace) or binary byte fields. Other
- ! moira objects such as users, lists, machines, etc. should be
- ! referenced by their internal ID numbers. If you're creating a new
- ! type that may be referenced by other tables, assign each object a
- ! unique ID number as well as its name. Add this table specification
- ! to db/dbbuild, so that recompiling the backup and restore programs
- will cause them to know about the new table(s).
-
- ! 3. If a new object type is added to the database, also update
- server/incremental.qc to know about incremental updates to this type
- of object.
-
- ! 4. Specify the queries that will be used to access this data. Most
- ! datatypes have 4 queries: retrieve, add, update, and delete. Some
- ! have multiple kinds of retrieves, and/or multiple kinds of updates.
- ! If you make it similar to other existing queries, you are more
- likely to be able to share code in the server.
-
- 5. Make the additional entries in server/queries2.c for the new
- --- 172,220 ----
-
- - 1 or more hosts as POP service providers listed in the hosts sub-menu
- of the dcm menu in the moira client. Value2 for each of these is the
- ! maximum number of poboxes that may be allocated on that server,
- value1 is the number currently allocated.
-
- ! - 1 or more NFS partitions listed in the nfs menu of the moira client.
- ! The declared size of the partition must be greater than the sum of
- the quotas that will be assigned to it. The status must be "Student"
- for register to automatically assign new users there.
-
- ! - register.moiraserver@localrealm must be on the "add" and "modify"
- access control lists for the Kerberos admin server.
-
- ! When you are confident that the system works, you may have the daemons started
- ! by /etc/rc. We prefer to start them by hand after verifying that the database
- ! survived any system crash. We also have /etc/rc create the file /etc/nodcm at
- boot time, so that the DCMs started every 15 minutes won't do anything until we
- removed that file.
-
- Customization
-
- ! This is difficult to give advice on, but I'll start by describing how we add
- new services and change things.
-
- ! 1. First determine what data must be recorded for this service. What
- is the type of each datum: integer, string, date, username,
- listname, machinename, other?
- 2. Design the Ingres table to record this information. Integers may be
- ! 1, 2, or 4 bytes long. Strings may be ascii character strings
- ! (storage compresses out whitespace) or binary byte fields. Other
- ! moira objects such as users, lists, machines, etc. should be
- ! referenced by their internal ID numbers. If you're creating a new
- ! type that may be referenced by other tables, assign each object a
- ! unique ID number as well as its name. Add this table specification
- ! to db/dbbuild, so that recompiling the backup and restore programs
- will cause them to know about the new table(s).
-
- ! 3. If a new object type is added to the database, also update
- server/incremental.qc to know about incremental updates to this type
- of object.
-
- ! 4. Specify the queries that will be used to access this data. Most
- ! datatypes have 4 queries: retrieve, add, update, and delete. Some
- ! have multiple kinds of retrieves, and/or multiple kinds of updates.
- ! If you make it similar to other existing queries, you are more
- likely to be able to share code in the server.
-
- 5. Make the additional entries in server/queries2.c for the new
- ***************
- *** 214,224 ****
- the query table is coded. Then recompile and re-install the server.
- You can test the new queries with the mrtest client.
-
- ! 6. It may be necessary to write a new dcm extraction program (for many
- ! services, this is the only thing required: no new data or queries).
- ! The source to these is in the gen directory. Note that they touch
- ! the database directly, rather than going through the moira server.
- ! This is for performance reasons. These routines use the queue and
- ! hash table routines from the moira library. The easiest way to
- ! write a new one that does all of the time checking correctly is to
- start with one of the existing ones.
- --- 222,232 ----
- the query table is coded. Then recompile and re-install the server.
- You can test the new queries with the mrtest client.
-
- ! 6. It may be necessary to write a new dcm extraction program (for many
- ! services, this is the only thing required: no new data or queries).
- ! The source to these is in the gen directory. Note that they touch
- ! the database directly, rather than going through the moira server.
- ! This is for performance reasons. These routines use the queue and
- ! hash table routines from the moira library. The easiest way to
- ! write a new one that does all of the time checking correctly is to
- start with one of the existing ones.
- *** /mit/bitbucket/mar/moira/doc/tech-plan/db_analysis.mss Wed Mar 21 19:04:17 1990
- --- doc/tech-plan/db_analysis.mss Wed Apr 25 14:58:38 1990
- ***************
- *** 33,39 ****
-
- Two programs (@t[mrbackup] and @t[mrrestore]) are generated
- automatically (using an @t[awk] script) from the database description
- ! file @t[sms/db/dbbuild]@footnote[All pathnames are relative to the
- root of the Moira source tree]. @t[mrbackup] copies each relation of
- the current Moira database into an ASCII file. Each row of the database
- is converted into a single line of text; each line consists of several
- --- 33,39 ----
-
- Two programs (@t[mrbackup] and @t[mrrestore]) are generated
- automatically (using an @t[awk] script) from the database description
- ! file @t[db/newdb]@footnote[All pathnames are relative to the
- root of the Moira source tree]. @t[mrbackup] copies each relation of
- the current Moira database into an ASCII file. Each row of the database
- is converted into a single line of text; each line consists of several
- ***************
- *** 60,66 ****
- @begin(programexample, Size -1)
- # createdb smstemp
- # quel smstemp
- ! * \i /u1/sms/db/dbbuild @i(load DB definition)
- * \g @i(execute DB definition)
- * \q @i(quit)
- # mrrestore
- --- 60,66 ----
- @begin(programexample, Size -1)
- # createdb smstemp
- # quel smstemp
- ! * \i /mit/moira/src/db/newdb @i(load DB definition)
- * \g @i(execute DB definition)
- * \q @i(quit)
- # mrrestore
- *** /mit/bitbucket/mar/moira/clients/moira/dcmmaint.c Wed May 2 12:39:55 1990
- --- clients/moira/dcmmaint.c Wed Apr 25 12:42:20 1990
- ***************
- *** 1,4 ****
- ! /* $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/dcmmaint.c,v 1.8 90/03/27 11:40:41 mar Exp $
- *
- * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
- * For copying and distribution information, please see the file
- --- 1,4 ----
- ! /* $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/dcmmaint.c,v 1.9 90/04/25 12:42:04 mar Exp $
- *
- * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
- * For copying and distribution information, please see the file
- ***************
- *** 113,123 ****
- char **argv;
- {
- int status;
- ! char *info[8];
-
- initserv(argv[1], info);
- askserv(info);
- ! if (status = do_mr_query("add_server_info", 8, info, Scream, NULL))
- com_err(whoami, status, " while updating server info");
- FreeInfo(info);
- return(DM_NORMAL);
- --- 113,123 ----
- char **argv;
- {
- int status;
- ! char *info[SC_END];
-
- initserv(argv[1], info);
- askserv(info);
- ! if (status = do_mr_query("add_server_info", SC_END, info, Scream, NULL))
- com_err(whoami, status, " while updating server info");
- FreeInfo(info);
- return(DM_NORMAL);
- ***************
- *** 178,184 ****
- int argc;
- char **argv;
- {
- ! char *qargv[9];
- int status;
-
- qargv[0] = (char *)argv[1];
- --- 178,184 ----
- int argc;
- char **argv;
- {
- ! char *qargv[SC_END];
- int status;
-
- qargv[0] = (char *)argv[1];
- ***************
- *** 188,194 ****
- return(DM_NORMAL);
- }
- askserv(qargv);
- ! if (status = do_mr_query("update_server_info", 8, qargv, Scream, NULL))
- com_err(whoami, status, " while updating server info");
- return(DM_NORMAL);
- }
- --- 188,194 ----
- return(DM_NORMAL);
- }
- askserv(qargv);
- ! if (status = do_mr_query("update_server_info", SC_END, qargv, Scream, NULL))
- com_err(whoami, status, " while updating server info");
- return(DM_NORMAL);
- }
- ***************
- *** 256,262 ****
- char **argv;
- {
- int status;
- ! char *qargv[5], buf[BUFSIZ];
-
- sprintf(buf, "Reset state for service %s (Y/N)", argv[1]);
- if (!Confirm(buf))
- --- 256,262 ----
- char **argv;
- {
- int status;
- ! char *qargv[6], buf[BUFSIZ];
-
- sprintf(buf, "Reset state for service %s (Y/N)", argv[1]);
- if (!Confirm(buf))
- ***************
- *** 371,377 ****
- int argc;
- char **argv;
- {
- ! char *info[SHI_END+1];
- int status;
-
- info[SHI_SERVICE] = strsave(argv[1]);
- --- 371,377 ----
- int argc;
- char **argv;
- {
- ! char *info[SHI_END];
- int status;
-
- info[SHI_SERVICE] = strsave(argv[1]);
- ***************
- *** 394,400 ****
- int argc;
- char **argv;
- {
- ! char *info[SHI_END+1];
- int status;
-
- info[SHI_SERVICE] = strsave(argv[1]);
- --- 394,400 ----
- int argc;
- char **argv;
- {
- ! char *info[SHI_END];
- int status;
-
- info[SHI_SERVICE] = strsave(argv[1]);
- ***************
- *** 401,407 ****
- info[SHI_MACHINE] = strsave(canonicalize_hostname(argv[2]));
- inithost(info);
- askhost(info);
- ! if (status = do_mr_query("add_server_host_info", 6, info, Scream, NULL))
- com_err(whoami, status, " while adding server/host info");
- FreeInfo(info);
- return(DM_NORMAL);
- --- 401,408 ----
- info[SHI_MACHINE] = strsave(canonicalize_hostname(argv[2]));
- inithost(info);
- askhost(info);
- ! if (status = do_mr_query("add_server_host_info", SHI_END, info,
- ! Scream, NULL))
- com_err(whoami, status, " while adding server/host info");
- FreeInfo(info);
- return(DM_NORMAL);
- *** /mit/bitbucket/mar/moira/clients/moira/cluster.c Sat Mar 17 17:10:13 1990
- --- clients/moira/cluster.c Wed Apr 25 12:35:07 1990
- ***************
- *** 1,5 ****
- #if (!defined(lint) && !defined(SABER))
- ! static char rcsid_module_c[] = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/cluster.c,v 1.17 90/03/17 17:10:08 mar Exp $";
- #endif lint
-
- /* This is the file cluster.c for the MOIRA Client, which allows a nieve
- --- 1,5 ----
- #if (!defined(lint) && !defined(SABER))
- ! static char rcsid_module_c[] = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/cluster.c,v 1.18 90/04/25 12:34:59 mar Exp $";
- #endif lint
-
- /* This is the file cluster.c for the MOIRA Client, which allows a nieve
- ***************
- *** 11,17 ****
- *
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/cluster.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/cluster.c,v 1.17 90/03/17 17:10:08 mar Exp $
- *
- * Copyright 1988 by the Massachusetts Institute of Technology.
- *
- --- 11,17 ----
- *
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/cluster.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/cluster.c,v 1.18 90/04/25 12:34:59 mar Exp $
- *
- * Copyright 1988 by the Massachusetts Institute of Technology.
- *
- ***************
- *** 987,993 ****
- if( (stat = do_mr_query("add_cluster_data", 3, argv + 1,
- Scream, (char *) NULL)) != 0)
- com_err(program_name, stat, " in AddClusterData.");
- !
- }
-
- /* Function Name: RealRemoveClusterData
- --- 987,993 ----
- if( (stat = do_mr_query("add_cluster_data", 3, argv + 1,
- Scream, (char *) NULL)) != 0)
- com_err(program_name, stat, " in AddClusterData.");
- ! return(DM_NORMAL);
- }
-
- /* Function Name: RealRemoveClusterData
- *** /mit/bitbucket/mar/moira/clients/moira/delete.c Sat Mar 17 17:10:29 1990
- --- clients/moira/delete.c Wed Apr 25 12:50:47 1990
- ***************
- *** 1,5 ****
- #if (!defined(lint) && !defined(SABER))
- ! static char rcsid_module_c[] = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/delete.c,v 1.16 90/03/17 17:10:23 mar Exp $";
- #endif lint
-
- /* This is the file delete.c for the MOIRA Client, which allows a nieve
- --- 1,5 ----
- #if (!defined(lint) && !defined(SABER))
- ! static char rcsid_module_c[] = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/delete.c,v 1.17 90/04/25 12:50:26 mar Exp $";
- #endif lint
-
- /* This is the file delete.c for the MOIRA Client, which allows a nieve
- ***************
- *** 11,17 ****
- *
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/delete.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/delete.c,v 1.16 90/03/17 17:10:23 mar Exp $
- *
- * Copyright 1988 by the Massachusetts Institute of Technology.
- *
- --- 11,17 ----
- *
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/delete.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/delete.c,v 1.17 90/04/25 12:50:26 mar Exp $
- *
- * Copyright 1988 by the Massachusetts Institute of Technology.
- *
- ***************
- *** 426,431 ****
- --- 426,432 ----
- return(SUB_NORMAL);
- }
-
- + #ifndef ATHENA
- /* Function Name: RealDeleteUser
- * Description: Just Deletes the user.
- * Arguments: name - name of User to delete
- ***************
- *** 448,453 ****
- --- 449,455 ----
- Put_message(buf);
- return(SUB_NORMAL);
- }
- + #endif
-
- /* Function Name: RealDeleteList
- * Description: Just Deletes the list.
- ***************
- *** 636,642 ****
- --- 638,646 ----
- int status;
- char buf[BUFSIZ];
- char * name = argv[1]; /* name of the user we are deleting. */
- + #ifndef ATHENA
- struct qelem *local, *member_of = NULL;
- + #endif
-
- if (!ValidName(name))
- return(DM_NORMAL);
- ***************
- *** 652,665 ****
- if (status == 0) {
- sprintf(buf,"User %s deleted.", name);
- Put_message(buf);
- /* delete this return if the policy decision below is reversed */
- return(DM_NORMAL);
- }
- /* Design decision not to allow registered users to be deleted.
- */
- Put_message("Sorry, registered users cannot be deleted from the database.");
- Put_message("Deactivate the user now, and the system manager will expunge later.");
- ! #ifdef notdef
- else if (status == MR_IN_USE) {
-
- /*
- --- 656,672 ----
- if (status == 0) {
- sprintf(buf,"User %s deleted.", name);
- Put_message(buf);
- + #ifdef ATHENA
- /* delete this return if the policy decision below is reversed */
- return(DM_NORMAL);
- + #endif
- }
- + #ifdef ATHENA
- /* Design decision not to allow registered users to be deleted.
- */
- Put_message("Sorry, registered users cannot be deleted from the database.");
- Put_message("Deactivate the user now, and the system manager will expunge later.");
- ! #else
- else if (status == MR_IN_USE) {
-
- /*
- *** /mit/bitbucket/mar/moira/clients/moira/pobox.c Sat Mar 17 17:11:11 1990
- --- clients/moira/pobox.c Wed Apr 25 12:39:55 1990
- ***************
- *** 1,5 ****
- #if (!defined(lint) && !defined(SABER))
- ! static char rcsid_module_c[] = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/pobox.c,v 1.14 90/03/17 17:11:09 mar Exp $";
- #endif lint
-
- /* This is the file pobox.c for the MOIRA Client, which allows a nieve
- --- 1,5 ----
- #if (!defined(lint) && !defined(SABER))
- ! static char rcsid_module_c[] = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/pobox.c,v 1.15 90/04/25 12:39:49 mar Exp $";
- #endif lint
-
- /* This is the file pobox.c for the MOIRA Client, which allows a nieve
- ***************
- *** 11,17 ****
- *
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/pobox.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/pobox.c,v 1.14 90/03/17 17:11:09 mar Exp $
- *
- * Copyright 1988 by the Massachusetts Institute of Technology.
- *
- --- 11,17 ----
- *
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/pobox.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/pobox.c,v 1.15 90/04/25 12:39:49 mar Exp $
- *
- * Copyright 1988 by the Massachusetts Institute of Technology.
- *
- ***************
- *** 225,230 ****
- --- 225,231 ----
- }
-
- default: /* ^C hit. */
- + type = "NONE";
- break;
- }
-
- *** /mit/bitbucket/mar/moira/clients/moira/utils.c Wed May 2 12:40:12 1990
- --- clients/moira/utils.c Wed May 2 13:13:43 1990
- ***************
- *** 1,5 ****
- #if (!defined(lint) && !defined(SABER))
- ! static char rcsid_module_c[] = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/utils.c,v 1.25 90/04/09 18:05:03 mar Exp $";
- #endif lint
-
- /* This is the file utils.c for the MOIRA Client, which allows a nieve
- --- 1,5 ----
- #if (!defined(lint) && !defined(SABER))
- ! static char rcsid_module_c[] = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/utils.c,v 1.26 90/05/02 13:13:32 mar Exp $";
- #endif lint
-
- /* This is the file utils.c for the MOIRA Client, which allows a nieve
- ***************
- *** 11,17 ****
- *
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/utils.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/utils.c,v 1.25 90/04/09 18:05:03 mar Exp $
- *
- * Copyright 1988 by the Massachusetts Institute of Technology.
- *
- --- 11,17 ----
- *
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/utils.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/RCS/utils.c,v 1.26 90/05/02 13:13:32 mar Exp $
- *
- * Copyright 1988 by the Massachusetts Institute of Technology.
- *
- ***************
- *** 858,864 ****
- return(GetTypeFromUser(prompt, tname, pointer));
- }
- for (elem = GetTypeValues(tname); elem; elem = elem->q_forw) {
- ! if (!cistrcmp(elem->q_data, *pointer)) {
- strcpy(*pointer, elem->q_data);
- return(SUB_NORMAL);
- }
- --- 864,870 ----
- return(GetTypeFromUser(prompt, tname, pointer));
- }
- for (elem = GetTypeValues(tname); elem; elem = elem->q_forw) {
- ! if (!strcasecmp(elem->q_data, *pointer)) {
- strcpy(*pointer, elem->q_data);
- return(SUB_NORMAL);
- }
- *** /mit/bitbucket/mar/moira/rpc/strs.c Tue Sep 13 15:53:49 1988
- --- rpc/strs.c Wed May 2 13:12:19 1990
- ***************
- *** 1,7 ****
- /*
- ! * $Source: /mit/smsdev/rpc/RCS/strs.c,v $
- * $Author: mar $
- ! * $Header: strs.c,v 1.5 88/09/13 15:52:49 mar Exp $
- *
- * Copyright (C) 1987 by the Massachusetts Institute of Technology
- * For copying and distribution information, please see the file
- --- 1,7 ----
- /*
- ! * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/rpc/RCS/strs.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/rpc/RCS/strs.c,v 1.6 90/05/02 13:12:11 mar Exp $
- *
- * Copyright (C) 1987 by the Massachusetts Institute of Technology
- * For copying and distribution information, please see the file
- ***************
- *** 11,17 ****
- */
-
- #ifndef lint
- ! static char *rcsid_strs_c = "$Header: strs.c,v 1.5 88/09/13 15:52:49 mar Exp $";
- #endif lint
-
- #include <mit-copyright.h>
- --- 11,17 ----
- */
-
- #ifndef lint
- ! static char *rcsid_strs_c = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/rpc/RCS/strs.c,v 1.6 90/05/02 13:12:11 mar Exp $";
- #endif lint
-
- #include <mit-copyright.h>
- ***************
- *** 73,93 ****
- *t = '\0';
- return s;
- }
- -
- - /*
- - * Case insensitive string compare.
- - */
- -
- - int cistrcmp(cp1, cp2)
- - char *cp1, *cp2;
- - {
- - register int c1, c2;
- -
- - do {
- - if (isupper(c1 = (*cp1++))) c1 = tolower(c1);
- - if (isupper(c2 = (*cp2++))) c2 = tolower(c2);
- - if (c1 != c2) return c1-c2;
- - } while (c1 && c2);
- - return 0;
- - }
- -
- --- 73,75 ----
- *** /mit/bitbucket/mar/moira/rpc/nfsparttype.c Sat Mar 17 16:37:15 1990
- --- rpc/nfsparttype.c Wed May 2 13:12:30 1990
- ***************
- *** 1,7 ****
- /*
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/rpc/RCS/nfsparttype.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/rpc/RCS/nfsparttype.c,v 1.3 90/03/17 16:37:13 mar Exp $
- *
- * Copyright (C) 1987 by the Massachusetts Institute of Technology
- * For copying and distribution information, please see the file
- --- 1,7 ----
- /*
- * $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/rpc/RCS/nfsparttype.c,v $
- * $Author: mar $
- ! * $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/rpc/RCS/nfsparttype.c,v 1.4 90/05/02 13:12:20 mar Exp $
- *
- * Copyright (C) 1987 by the Massachusetts Institute of Technology
- * For copying and distribution information, please see the file
- ***************
- *** 10,16 ****
- */
-
- #ifndef lint
- ! static char *rcsid_nfsparttype_c = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/rpc/RCS/nfsparttype.c,v 1.3 90/03/17 16:37:13 mar Exp $";
- #endif lint
-
- #include <mit-copyright.h>
- --- 10,16 ----
- */
-
- #ifndef lint
- ! static char *rcsid_nfsparttype_c = "$Header: /afs/athena.mit.edu/astaff/project/moiradev/src/rpc/RCS/nfsparttype.c,v 1.4 90/05/02 13:12:20 mar Exp $";
- #endif lint
-
- #include <mit-copyright.h>
- ***************
- *** 105,111 ****
- t = strtrim(temp); /* nuke leading and trailing whitespace */
-
- for (pp = fs_names; pp->type; pp++) {
- ! if (cistrcmp(pp->name, t) == 0) {
- flags |= pp->type;
- break;
- }
- --- 104,110 ----
- t = strtrim(temp); /* nuke leading and trailing whitespace */
-
- for (pp = fs_names; pp->type; pp++) {
- ! if (strcasecmp(pp->name, t) == 0) {
- flags |= pp->type;
- break;
- }
- *** /mit/bitbucket/mar/moira/update/Makefile Mon Mar 19 13:04:26 1990
- --- update/Makefile Wed May 2 13:20:36 1990
- ***************
- *** 1,6 ****
- #
- # $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/update/RCS/Makefile,v $
- ! # $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/update/RCS/Makefile,v 1.16 90/03/19 13:04:21 mar Exp $
- #
-
- #
- --- 1,6 ----
- #
- # $Source: /afs/athena.mit.edu/astaff/project/moiradev/src/update/RCS/Makefile,v $
- ! # $Header: /afs/athena.mit.edu/astaff/project/moiradev/src/update/RCS/Makefile,v 1.17 90/05/02 13:20:25 mar Exp $
- #
-
- #
- ***************
- *** 31,37 ****
-
- LIBS= -L../lib -lmoira -lgdb -lkrb -ldes -lcom_err
-
- ! all: moira_update.o update_server sms_untar
-
- update_server: ${SOBJS}
- cc ${CFLAGS} -o update_server ${SOBJS} ${LIBS}
- --- 31,37 ----
-
- LIBS= -L../lib -lmoira -lgdb -lkrb -ldes -lcom_err
-
- ! all: moira_update.o update_server
-
- update_server: ${SOBJS}
- cc ${CFLAGS} -o update_server ${SOBJS} ${LIBS}
- ***************
- *** 39,57 ****
- moira_update.o: ${COBJS}
- ld -r -o moira_update.o ${COBJS}
-
- - sms_untar: sms_untar.c
- - cc -o sms_untar ${INCS} sms_untar.c
-
- -
- clean:
- -rm -f ${COBJS} ${SOBJS}
- -rm -f update_server moira_update.o
- - -rm -f sms_untar
- -rm -f core a.out *~ \#*
-
- install: update_server
- install -c -s update_server ${DESTDIR}/usr/etc/update_server
- - install -c -s sms_untar ${DESTDIR}/etc/sms_untar
-
- lint:
- lint ${LINTFLAGS} ${SSRCS}
- --- 39,52 ----
-